﻿using log4net;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using Timesheet.Data.Infrastructure;
using Timesheet.Data.Repository;
using Timesheet.Domain;

namespace Timesheet.Service
{
    public class LocationsService : ILocationsService
    {
        private readonly ILocationsRepository _Repository;
        private readonly IUnitOfWork _UnitOfWork;
        public ILog Logger { get; private set; }

        public LocationsService(ILocationsRepository LocationsRepository,IUnitOfWork unitOfWork)
        {
            this._Repository = LocationsRepository;
            this._UnitOfWork = unitOfWork;
        }


        #region ILocationsService Members

        public IList<Locations> GetLocations()
        {
            return this._Repository.GetAll().ToList();
        }

        public bool CheckExist(Locations entity)
        {
            throw new NotImplementedException();
        }

        public Locations GetByID(Int64 id)
        {
            return this._Repository.GetById(id);
        }

        public void Add(Locations entity)
        {
            this._Repository.Add(entity);
        }

        public void Update(Locations entity)
        {
            this._Repository.Update(entity);
        }

        public void Delete(Locations entity)
        {
            this._Repository.Delete(entity);
        }             
        #endregion       
    }
}
